Skip to content

Add ga analytics#28

Open
prajwal-pai77 wants to merge 2 commits intomasterfrom
add-ga-analytics
Open

Add ga analytics#28
prajwal-pai77 wants to merge 2 commits intomasterfrom
add-ga-analytics

Conversation

@prajwal-pai77
Copy link
Copy Markdown
Collaborator

  • Add google analytics
  • Add cookie banner

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the Docusaurus configuration to include OneTrust cookie consent scripts and tracking via Google Tag Manager and Google Analytics. Feedback was provided regarding a potential domain mismatch for the OneTrust script ID, the redundancy of using both GTM and gtag simultaneously which can cause duplicate tracking, and the unnecessary anonymizeIP setting for GA4 properties.

Comment thread docusaurus/docusaurus.config.ts
Comment on lines +66 to +72
googleTagManager: {
containerId: 'GTM-MVPNN2',
},
gtag: {
trackingID: 'G-CVKKEY0D6B',
anonymizeIP: true,
},
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Configuring both googleTagManager and gtag simultaneously is generally discouraged. This setup results in both tracking scripts being loaded, which can lead to duplicate event tracking (such as double page views) and negatively impact site performance. You should choose one tracking method. If you prefer GTM, you can manage your GA4 property within the GTM container and remove the gtag block.

Comment on lines +69 to +72
gtag: {
trackingID: 'G-CVKKEY0D6B',
anonymizeIP: true,
},
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The anonymizeIP option is unnecessary for Google Analytics 4 (GA4) properties (IDs starting with G-). GA4 anonymizes IP addresses by default, and this setting is ignored by the script.

        gtag: {
          trackingID: 'G-CVKKEY0D6B',
        },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant